// javamaps
// Copyright (c) 2010 Lup Gratian
package Rendering.Info;
import Core.*;
import Rendering.*;

public final class MarkerInfo implements IObjectInfo {
    Marker marker_;
    ILayer layer_;
    IRenderer parent_;
    Coordinates coordinates_;
    Point position_;
    Node nearestNode_;

    /*
     * Constructori.
     */
    public MarkerInfo(Marker marker, ILayer layer, IRenderer parent) {
        marker_ = marker;
        layer_ = layer;
        parent_ = parent;
    }

    public MarkerInfo(Marker marker, ILayer layer, IRenderer parent,
                      Point position, Coordinates coord, Node nearest) {
        this(marker, layer, parent);
        position_ = position;
        coordinates_ = coord;
        nearestNode_ = nearest;
    }

    /*
     * Metode publice.
     */
    public InfoType Type() { return InfoType.Marker; } // Read-only, trebuie
    public IRenderer Parent() { return parent_; }      // setate in constructor.
    public Marker Marker() { return marker_; }
    public ILayer Layer() { return layer_; }

    public Point Position() { return position_; }
    public void SetPosition(Point value) { position_ = value; }
    
    public Coordinates Coordinates() { return coordinates_; }
    public void SetPosition(Coordinates value) { coordinates_ = value; }

    public Node NearestNode() { return nearestNode_; }
    public void SetNearestNode(Node value) { nearestNode_ = value; }
}